<template>
	<view class="page">
		<u-navbar title="关于我们" titleStyle="color:#fff;" :placeholder="true" leftIconColor="#fff" :autoBack="true" bgColor="rgba(0,0,0,0)">
			
		</u-navbar>
		
		<view class="header">
			<image class="logo" :src="aigcinfo.logo"></image>
			<view class="title"><text class="text">{{aigcinfo.company_title}}</text></view>
			<view class="subtit"><text class="txt">{{aigcinfo.slogan}}</text></view>
			
		</view>
		<view class="main">
			
			<view class="subtit" v-if="flag">
				<view >
					<text class="txt">{{aigcinfo.sub_about.substr(0, 105)}}</text>
					<text class="txt" v-if="aigcinfo.sub_about != null && aigcinfo.sub_about.length > 105">...</text>
					<text class="showmore" v-if="aigcinfo.sub_about != null && aigcinfo.sub_about.length > 105" @click="change" style="color: #F9BE01;margin-left: 4rpx;">查看全部></text>
				</view>
				
			</view>
			<view class="subtit" v-else>
				<view ><text class="txt">{{aigcinfo.sub_about}}</text></view>
			</view>
		</view>	
		<view class="footer">
			<view class="erweima">
				<image class="img" :src="aigcinfo.image"></image>
			</view>
			<view class="info">
			<view><text class="txt" v-if="aigcinfo.wechat">微信：{{aigcinfo.wechat}} </text> </view>
			<view><text class="txt" v-if="aigcinfo.phone">电话： {{aigcinfo.phone}}</text></view> 
			<view><text class="txt" v-if="aigcinfo.sub_description" >{{aigcinfo.sub_description}}</text></view>
			<view><text class="txt" v-if="aigcinfo.address">{{aigcinfo.address}}</text></view>
			</view>
			
		</view>

	</view>
</template>

<script>

	
	export default {
		data() {
			return {
				aigcinfo: [],
				innerVer: 1.0,
				versionCode: 1.0,
				flag: true
			}
		},
		onLoad() {
			this.getAigcInfo();
		},
		methods: {
			left_click() {
				uni.navigateBack();
			},
			getAigcInfo(){
				uni.$u.http.get('/api/aigc_info/?from=miniprogram').then(res => {
					console.log('协议-----',res.data.data)
					this.aigcinfo = res.data.data
				}).catch(err => {
					console.log(err)
				})
			},
			change() {
			  this.flag = !this.flag;
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page {
		flex: 1;
		background: #2C2C2C;
		
	}
	
	.viewpage{
		height: 100%;
	}
	
	.header{
		margin-top: 80rpx;
		margin-left: 80rpx;
		margin-right: 80rpx;
		.logo {
			border-radius: 50rpx;
			width: 200rpx;
			height: 200rpx;
		}
		.title {
			margin-top: 20rpx;
			.text {
				font-family: PingFangSC-Semibold;
				font-size: 60rpx;
				font-weight: normal;
				line-height: 68rpx;
				color: #FFFFFF;
				
			}
		}
		.subtit {
			margin-top: 20rpx;
			.txt1 {
				font-family: PingFangSC-Semibold;
				font-size: 32rpx;
				font-weight: normal;
				line-height: 40rpx;
				color: #939393;
			}
			.txt {
				font-family: PingFangSC-Semibold;
				font-size: 28rpx;
				font-weight: normal;
				line-height: 38rpx;
				color: #939393;
			}
			.showmore{
				font-family: PingFangSC-Semibold;
				font-size: 28rpx;
				font-weight: normal;
				line-height: 38rpx;
				color: #F9BE01;
			}
		}
		
		
	}
	.main{
		margin-top: 70rpx;
		margin-left: 80rpx;
		margin-right: 80rpx;
		.subtit {
			min-height: 280rpx;
			.txt1 {
				font-family: PingFangSC-Semibold;
				font-size: 28rpx;
				font-weight: normal;
				line-height: 88rpx;
				color: #D5D5D5;
			}
			.txt {
				font-family: PingFangSC-Semibold;
				font-size:32rpx;
				font-weight: normal;
				line-height: 58rpx;
				color: #D5D5D5;
			}
		}
	}
	.footer{
		margin-top: 90rpx;
		margin-left: 80rpx;
		margin-right: 80rpx;
		padding-bottom: 40rpx;
		.erweima {
			width: 250rpx;
			height: 250rpx;
			border-radius: 20rpx;
			opacity: 1;
			background: #FFFFFF;
			//margin-top: 15rpx;
			box-sizing: border-box;
			padding: 14rpx;
			.img {
				width: 225rpx;
				height: 225rpx;
			}
			
		}
		.info{
			margin-top: 40rpx;
			flex-direction: row;
			.txt {
				font-size: 32rpx;
				font-weight: normal;
				line-height: 42rpx;
				margin-right: 30rpx;
				//text-align: justify; /* 浏览器可能不支持 */
				color: #939393;
				//margin: 15.82rpx auto;
			}
		}
		
		
	}
	
	
</style>

